
package com.example.demo.mybatis.mapper;


import com.example.demo.mybatis.model.PlcKwhPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.util.List;
@Mapper
public interface KwhMapper {
    @Select("select * from plc_kwh where id = #{id}")
    PlcKwhPojo getKwh(Long id);

    // 新增方法：查询所有 plc_kwh 数据
    @Select("select id, date, NO, V_A, V_B, V_C, A_A, A_B, A_C, V_AB, V_BC, V_AC, Q_ABC, P_ABC, S_ABC, COS, KWH, Hz, KWH_F, KWH_P, KWH_G, KWH_J from plc_kwh")
    List<PlcKwhPojo> getAllPlcKwh();

    // 多条件查询
    List<PlcKwhPojo> getAllPlcKwhByCondition(PlcKwhPojo plcKwhPojo);


    List<PlcKwhPojo> getAllPlcKwhByCondition2(PlcKwhPojo plcKwhPojo);
}
